Optimal. Leaf size=204 \[ -\frac{\left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}+\frac{\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{-a b e-a c d+b^2 d}{a^3 x}-\frac{\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}+\frac{b d-a e}{2 a^2 x^2}-\frac{d}{3 a x^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.286073, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {800, 634, 618, 206, 628} \[ -\frac{\left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}+\frac{\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{-a b e-a c d+b^2 d}{a^3 x}-\frac{\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}+\frac{b d-a e}{2 a^2 x^2}-\frac{d}{3 a x^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 800
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{d+e x}{x^4 \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac{d}{a x^4}+\frac{-b d+a e}{a^2 x^3}+\frac{b^2 d-a c d-a b e}{a^3 x^2}+\frac{-b^3 d+2 a b c d+a b^2 e-a^2 c e}{a^4 x}+\frac{b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a^4 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\int \frac{b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a+b x+c x^2} \, dx}{a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 a^4}+\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}\\ \end{align*}
Mathematica [A] time = 0.144197, size = 196, normalized size = 0.96 \[ \frac{\frac{6 \left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}-6 \log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )+3 \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log (a+x (b+c x))+\frac{3 a^2 (b d-a e)}{x^2}-\frac{2 a^3 d}{x^3}+\frac{6 a \left (a b e+a c d+b^2 (-d)\right )}{x}}{6 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 381, normalized size = 1.9 \begin{align*} -{\frac{d}{3\,a{x}^{3}}}-{\frac{e}{2\,a{x}^{2}}}+{\frac{bd}{2\,{a}^{2}{x}^{2}}}+{\frac{be}{{a}^{2}x}}+{\frac{cd}{{a}^{2}x}}-{\frac{{b}^{2}d}{{a}^{3}x}}-{\frac{ce\ln \left ( x \right ) }{{a}^{2}}}+{\frac{\ln \left ( x \right ){b}^{2}e}{{a}^{3}}}+2\,{\frac{\ln \left ( x \right ) bcd}{{a}^{3}}}-{\frac{\ln \left ( x \right ){b}^{3}d}{{a}^{4}}}+{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) e}{2\,{a}^{2}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{2}e}{2\,{a}^{3}}}-{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) bd}{{a}^{3}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{3}d}{2\,{a}^{4}}}+3\,{\frac{ceb}{{a}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+2\,{\frac{d{c}^{2}}{{a}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{{b}^{3}e}{{a}^{3}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-4\,{\frac{cd{b}^{2}}{{a}^{3}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{4}d}{{a}^{4}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 8.55927, size = 1449, normalized size = 7.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17995, size = 289, normalized size = 1.42 \begin{align*} \frac{{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{4}} - \frac{{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left ({\left | x \right |}\right )}{a^{4}} + \frac{{\left (b^{4} d - 4 \, a b^{2} c d + 2 \, a^{2} c^{2} d - a b^{3} e + 3 \, a^{2} b c e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} a^{4}} - \frac{2 \, a^{3} d + 6 \,{\left (a b^{2} d - a^{2} c d - a^{2} b e\right )} x^{2} - 3 \,{\left (a^{2} b d - a^{3} e\right )} x}{6 \, a^{4} x^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]